package top.songxs.gmall.product.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import top.songxs.gmall.common.result.Result;
import top.songxs.gmall.common.result.ResultCodeEnum;
import top.songxs.gmall.product.entity.BaseCategory1;
import top.songxs.gmall.product.service.BaseCategory1Service;

import java.util.List;

@RestController
@RequestMapping("admin/product")
public class BaseCategory1Controller {
    @Autowired
    private BaseCategory1Service baseCategory1Service;

    @GetMapping("getCategory1")
    public Result<List<BaseCategory1>> findAllBaseCategory1(){
        List<BaseCategory1> lists = baseCategory1Service.list();
        return Result.build(lists, ResultCodeEnum.SUCCESS);
    }


}
